<template>
	<xh-container title="详情">
		<view style="height: 10px"></view>
		<xh-desc-item
			:label-width="90"
			label="领料人"
			:text="detailData.pickPerson"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="需求数量"
			:text="detailData.pickAmount"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="状态"
			>{{ getText(detailData.isAssigned) }}</xh-desc-item
		>
		<xh-desc-item
			:label-width="90"
			label="可领取数量"
			>{{ detailData.balanceAmount }}</xh-desc-item
		>
		<xh-desc-item
			:label-width="90"
			label="可持有数量"
			>{{ detailData.totalAmount }}</xh-desc-item
		>
		<xh-desc-item
			:label-width="90"
			label="裁片编号"
			>{{ detailData.cuttingCode }}</xh-desc-item
		>
		<xh-desc-item
			:label-width="90"
			label="产品名称"
			>{{ detailData.productName }}</xh-desc-item
		>
		<xh-desc-item
			:label-width="90"
			label="辅料名称"
			:text="detailData.accessoriesName"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="辅料数量"
			:text="detailData.accessories"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="领料日期"
			:text="detailData.pickDate"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="创建人"
			:text="detailData.createBy"
		></xh-desc-item>
		<xh-desc-item
			:label-width="90"
			label="创建时间"
			:text="detailData.createTime"
		></xh-desc-item>
	</xh-container>
</template>

<script>
import { decodeParams } from '@/utils/common.js';
import { ApplyAuditStatusEnum } from '@/utils/constant';
export default {
	name: 'detailPage',
	data() {
		return {
			detailData: {},
		};
	},
	onLoad(options) {
		this.detailData = decodeParams(options);
	},
	methods: {
		getText(val) {
			return ApplyAuditStatusEnum.find((item) => `${item.value}` === `${val}`)
				?.text;
		},
	},
};
</script>

<style scoped lang="scss"></style>
